#include<iostream>
#include<future>

void func021(std::promise<int>& f) {
	f.set_value(1000);
}

int main021() {
	std::promise<int> f;
	auto future_reuslt = f.get_future();
	std::thread t1(func021, ref(f));
	t1.join();
	std::cout << future_reuslt.get() << std::endl;

	return 0;
}